home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_basi / n_b-v200.zip / NB03 / DMO / BASE-26.DMO next >
Text File  |  1996-03-11  |  2KB  |  48 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1996-02-08 ╟─╖
  5.  │  │ FILE NAME   BASE-26 .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB03.INC"
  22. COLOR 7, 0
  23. CLS
  24.  
  25. ? "┌─────────────────────────────────────────────────────────────────────
  26. ? "│ fBase26$( Number% )   Number% => 1 and =< 676
  27. ? "├─────────────────────────────────────────────────────────────────────
  28. ? "│ This little function converts decimal numbers into base 26 using
  29. ? "│ A->Z. It is handy when printing lists where item numbers could be
  30. ? "│ confused with some other number on the form. ie: An order form
  31. ? "│ could have a quantity field and a line number field next to each
  32. ? "│ other and 'AA 01' leads to less mistakes than '01 01' would.
  33. ? "└─────────────────────────────────────────────────────────────────────
  34.  
  35. Row%   = 10
  36. Col%   =  1
  37. Start% =  0
  38. FOR N% = Start% TO 677
  39.   LOCATE Row%, Col%
  40.   PRINT USING$( "###=", N% ); fBase26$(N%); "│";
  41.   INCR Row%
  42.   IF Row% = 26 THEN
  43.     Row% = 10
  44.     INCR Col%, 7
  45.     IF Col% > 72 THEN EXIT FOR
  46.   END IF
  47. NEXT
  48.